package com.ms.framework.util;
/**   
 * @see
 * @author jingyul
 * @version 1.0
 * @preserve protected
 */
public class WebUtil  {
	public static String decodeISO8859(String val,String encoding){
		return decode(val,"ISO8859-1",encoding);
	}
	public static String decode(String val,String readEncoding,String toEncoding){
		if(StringUtil.isEmpty(val)|| StringUtil.isEmpty(toEncoding)|| StringUtil.isEmpty(readEncoding)){
			return val;
		}
		try{return new String(val.getBytes(readEncoding), toEncoding);}catch(Exception e){}
		return val;
	}
}
